﻿#ifndef BOARD_H
#define BOARD_H

#include <QGraphicsObject>
#include <QGraphicsScene>
#include <QPixmap>

class Board : public QGraphicsObject
{
    Q_OBJECT
public:
    Board(QGraphicsScene* scene);
    ~Board();
    QPoint firstPoint();

protected:
    QRectF boundingRect() const;
    void paint(QPainter *painter,
               const QStyleOptionGraphicsItem *option,
               QWidget *widget);
    void drawFace();

    // 不参与碰撞检测
    bool collidesWithItem(const QGraphicsItem *other, Qt::ItemSelectionMode mode) const;
    bool collidesWithPath(const QPainterPath &path, Qt::ItemSelectionMode mode) const;


private:
    QGraphicsScene* m_scene;
    QPixmap* m_face;


};

#endif // BOARD_H
